<template>
  <el-container>
    <el-aside style="width: auto">
      <RouteMenu :isCollapse="isCollapse" />
    </el-aside>
    <el-container>
      <el-header style="height: 80px">
        <div class="route-menu-control">
          <i class="fold-menu-icon" :class="isCollapse ? 'el-icon-s-unfold' : 'el-icon-s-fold'" @click="setCollapse"></i>
        </div>
      </el-header>
      <el-main>Main</el-main>
    </el-container>
  </el-container>
</template>

<script>
import RouteMenu from '../../components/routeMenu/index'
export default {
  name: "Home",
  data() {
    return {
      isCollapse: false
    }
  },
  components: {
    RouteMenu
  },
  methods: {
    setCollapse() {
      this.isCollapse = !this.isCollapse
    }
  }
}
</script>

<style scoped>
.el-container {
  height: 100%;
}
.el-header {
  border-bottom: 1px solid;
  padding: 0 10px;
}
.el-aside {
  border: 1px solid;
}
.el-main {
  border: 1px solid;
}
.route-menu-control {
  height: 80px;
  line-height: 80px;
  font-size: 25px;
  color: #686868;
}
.fold-menu-icon {
  cursor: pointer;

}
</style>
